package com.fmdj.bff.driver.feign;
import com.fmdj.common.util.CommonResult;
import com.fmdj.bff.driver.controller.form.*;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

@FeignClient("fmdj-dr") //远程服务名称(子项目)
public interface DrServiceApi {

    @PostMapping("/driver/registerDriver") // 调用的controller层的路径以及方法声明
    public CommonResult registerDriver(@RequestBody @Valid RegisterDriverForm form);

    @PostMapping("/driver/updateDriverAuth")
    public CommonResult updateDriverAuth(@RequestBody @Valid UpdateDriverAuthForm form);

    @PostMapping("/driver/login")
    public CommonResult login(@RequestBody @Valid LoginForm form);

    @PostMapping("/driver/selectDriverInfo")
    public CommonResult selectDriverInfo(@RequestBody @Valid SelectDriverInfoForm form);

    //查询司机设置信息
    @PostMapping("/settings/selectDriverSettings")
    public CommonResult selectDriverSettings(@RequestBody @Valid SelectDriverSettingsForm form);

    @PostMapping("/driver/selectDriverInfoById")
    public CommonResult selectDriverInfoById(@RequestBody @Valid SelectDriverAuthForm form);
}
